#!/usr/bin/env python
# -*- coding: utf-8 -*-
# datetime: 27/12/2023 下午11:59
# Author: name
# File: run_pytest.py
# ide: PyCharm
# description:
import os

import pytest


def run_pytest():
    print("我被加入后台任务，我将会在后台被执行")
    allure_path = f'./autotest/1703745231259/allure/temp'
    # pytest.main(['-vs', f'--alluredir={allure_path}', '--clean-alluredir', '--cache-clear'])
    pytest.main(['./autotest/1703745231259/test_test_case_1703671900.py','-vs', f'--alluredir={allure_path}'])

    os.system(f"allure generate {allure_path} -o ./autotest/1703745231259/allure/report")
    # pin_update("show_data", value=f"执行完成，测试报告地址：http://{get_ip_address()}:8055/reports/{report_id}/report")

if __name__ == '__main__':
    run_pytest()